home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 111 / PC Guia 111.iso / Software / Utils / HJTHotkey 2.7.4 / HJTHotkey.exe / {app} / startup.ahk < prev   
Encoding:
Text File  |  2004-09-19  |  5.1 KB  |  219 lines

  1. ^d::
  2.  
  3. Startup:
  4.  
  5. ifnotexist, Startup4.txt
  6. {
  7. gosub, updateall
  8. send,^c
  9. }
  10.  
  11. clipboard=
  12.  
  13. send,^c
  14.  
  15. S:
  16. TrayTip,, Searching....
  17.  
  18. if A_OSVersion <= WIN_ME
  19. {
  20. SplashTextOn , 500, 30, Searching, Searching Startup database
  21. WinMove, Searching, Searching Startup database, 0, 0
  22. }
  23.  
  24. ClipWait, 2.5
  25. if clipboard=
  26. if ErrorLevel <> 0
  27. {
  28.     MsgBox, The attempt to copy text onto the clipboard failed.
  29.     return
  30. }
  31.  
  32. startupclip=%clipboard%
  33.  
  34. startup=
  35.  
  36. Loop, read, Startup4.txt
  37. {
  38.  
  39. ifinstring, A_LoopReadLine, %startupclip%
  40. {
  41.  
  42. startupitems=%A_LoopReadLine%
  43.  
  44. StringReplace,startupitems,startupitems,Status:,]`nStatus:%a_tab%,All
  45.  
  46. StringReplace,startupitems,startupitems,File:,`nFile:%a_tab%,All
  47.  
  48. StringReplace,startupitems,startupitems,Name:,Name:%a_tab%[,All
  49.  
  50. StringReplace,startupitems,startupitems,Description:,`n`n,All
  51.  
  52. StringReplace,startupitems,startupitems,More Info:,`n,All
  53.  
  54. startup=%startupitems%`n------------------------------------------------------------------------------------------------------------------------------`n%startup%
  55.  
  56. }
  57.  
  58. }
  59.  
  60.  
  61. if A_OSVersion <= WIN_ME
  62. {
  63.  
  64. SplashTextOn , 500, 30, Search Finished, Search Finished
  65. WinMove, Search Finished, Search Finished, 0, 0
  66. sleep, 500
  67. SplashTextOff
  68. }
  69. else
  70. {
  71. sleep, 500
  72. Traytip,, Search Finished
  73. sleep, 500
  74. Traytip
  75. }
  76.  
  77. SplashTextOff
  78.  
  79. if startup<>
  80. {
  81. GUI, destroy
  82. Gui, Add, Edit, x7 y11 w510 h390,%startup%
  83. Gui, Show, x336 y315 h411 w525, Search results for %startupclip%.....
  84.  
  85. winwait, Search results for %startupclip%.....
  86.  
  87. ControlClick, Edit1, Search results for %startupclip%.....,, Left
  88. }
  89. else
  90. {
  91. Traytip,, The selected item was not found.
  92. sleep, 500
  93. Traytip
  94. return
  95. }
  96. Return
  97.  
  98. GuiClose:
  99. {
  100. gui, cancel
  101. GUI, destroy
  102. startup=
  103. }
  104.  
  105.  
  106. reload
  107.  
  108. return
  109.  
  110.  
  111. updatestartupoffline:
  112.  
  113. MsgBox, 1, Startup Database, Click OK to Download the startup database from computercops.biz (This may take a while)
  114.  
  115. ifmsgbox, cancel
  116. {
  117. SplashTextOff
  118. exit
  119. }
  120.  
  121. TrayTip,, Downloading Startup List
  122.  
  123. URLDownloadToFile, http://castlecops.com/startuplist_xml.php, Startup.txt
  124.  
  125. setbatchlines, -1
  126.  
  127. Loop, read, Startup.txt, Startup3.txt
  128. {
  129.  
  130. A_LoopReadLine2=%A_LoopReadLine%
  131.  
  132.  
  133. StringReplace, A_LoopReadLine2, A_LoopReadLine2,`,,,All
  134.  
  135. StringReplace, A_LoopReadLine2, A_LoopReadLine2,<item>,`,,All
  136. StringReplace, A_LoopReadLine2, A_LoopReadLine2,</item>, ,All
  137.  
  138. StringReplace, A_LoopReadLine2, A_LoopReadLine2,<name>,Name:,All
  139. StringReplace, A_LoopReadLine2, A_LoopReadLine2,</name>, ,All
  140.  
  141.  
  142. StringReplace, A_LoopReadLine2, A_LoopReadLine2,<status>,Status:,All
  143. StringReplace, A_LoopReadLine2, A_LoopReadLine2,</status>, ,All
  144.  
  145. StringReplace, A_LoopReadLine2, A_LoopReadLine2,<command>,File:,All
  146. StringReplace, A_LoopReadLine2, A_LoopReadLine2,</command>, ,All
  147.  
  148. StringReplace, A_LoopReadLine2, A_LoopReadLine2,<description>,Description:,All
  149. StringReplace, A_LoopReadLine2, A_LoopReadLine2,</description>, ,All
  150.  
  151. StringReplace, A_LoopReadLine2, A_LoopReadLine2,<infourl>,More Info:,All
  152. StringReplace, A_LoopReadLine2, A_LoopReadLine2,</infourl>,,All
  153.  
  154. StringReplace, A_LoopReadLine2, A_LoopReadLine2, " target=\"_blank\">, , all
  155. StringReplace, A_LoopReadLine2, A_LoopReadLine2, " target="_blank">, , all
  156. StringReplace, A_LoopReadLine2, A_LoopReadLine2, " target="_blank", , all
  157.  
  158. StringReplace, A_LoopReadLine2, A_LoopReadLine2, /a>, , all
  159. StringReplace, A_LoopReadLine2, A_LoopReadLine2, <a href=", , all
  160.  
  161. StringReplace, A_LoopReadLine2, A_LoopReadLine2, <font color=\"#FF0000\">??</font>, , all
  162. StringReplace, A_LoopReadLine2, A_LoopReadLine2, <font color="#FF0000">, , all
  163.  
  164. StringReplace, A_LoopReadLine2, A_LoopReadLine2, <a href=\", , all
  165. StringReplace, A_LoopReadLine2, A_LoopReadLine2, \" target=\"_blank\">, , all
  166. StringReplace, A_LoopReadLine2, A_LoopReadLine2, A<, , all
  167.  
  168. StringReplace, A_LoopReadLine2, A_LoopReadLine2, \,%a_Space%, all
  169.  
  170. StringReplace, A_LoopReadLine2, A_LoopReadLine2, <;,%a_Space%, all
  171.  
  172. StringReplace, A_LoopReadLine2, A_LoopReadLine2, &,, all
  173. StringReplace, A_LoopReadLine2, A_LoopReadLine2, lt;,, all
  174. StringReplace, A_LoopReadLine2, A_LoopReadLine2, gt;,, all
  175.  
  176. StringReplace, A_LoopReadLine2, A_LoopReadLine2, /u&,, all
  177. StringReplace, A_LoopReadLine2, A_LoopReadLine2, &  ,, all
  178. StringReplace, A_LoopReadLine2, A_LoopReadLine2, u& ,, all
  179. StringReplace, A_LoopReadLine2, A_LoopReadLine2, D& ,, all
  180. StringReplace, A_LoopReadLine2, A_LoopReadLine2,quot;,,All
  181.  
  182. StringReplace, A_LoopReadLine2, A_LoopReadLine2,`n,,All
  183. StringReplace, A_LoopReadLine2, A_LoopReadLine2,`r,,All
  184.  
  185. StringReplace, A_LoopReadLine2, A_LoopReadLine2,quot;,,All
  186.  
  187. A_LoopReadLine2=%A_LoopReadLine2%
  188.  
  189. fileappend, %A_LoopReadLine2%
  190. }
  191.  
  192.  
  193.  
  194. Loop, read, Startup3.txt, Startup4.txt
  195. {
  196. A_LoopReadLine3=%A_LoopReadLine%
  197.  
  198. StringReplace, A_LoopReadLine3, A_LoopReadLine3,`,,`n,All
  199.  
  200. fileappend, %A_LoopReadLine3%
  201. }
  202.  
  203. filedelete, Startup.txt
  204.  
  205. filedelete, Startup3.txt
  206.  
  207. TrayTip,, Download Finished
  208. sleep, 500
  209. TrayTip
  210.  
  211. if A_OSVersion <= WIN_ME
  212. {
  213. SplashTextOff
  214. }
  215.  
  216. SplashTextOff
  217.  
  218. return
  219.